Various electro-optical systems have been developed for reading optical indicia, such as bar codes. A bar code is a coded pattern of graphical indicia comprised of a series of bars and spaces of varying widths, the bars and spaces having differing light reflecting characteristics. Some of the more popular bar code symbologies include: Universal Product Code (UPC), typically used in retail stores sales; Data Matrix, typically used for labeling small electronic products; Code 39, primarily used in inventory tracking; and Postnet, which is used for encoding zip codes for U.S. mail. Bar codes may be one dimensional (1D), i.e., a single row of graphical indicia such as a UPC bar code or two dimensional (2D), i.e., multiple rows of graphical indicia comprising a single bar code, such as Data Matrix which comprising multiple rows and columns of black and white square modules arranged in a square or rectangular pattern.
Systems that read bar codes (bar code readers) electro-optically transform the graphic indicia into electrical signals, which are decoded into alphanumerical characters that are intended to be descriptive of the article or some characteristic thereof. The characters are then typically represented in digital form and utilized as an input to a data processing system for various end-user applications such as point-of-sale processing, inventory control and the like.
Bar code readers that read and decode bar codes employing imaging systems are typically referred to as imaging-based bar code readers or bar code scanners. Imaging systems include charge coupled device (CCD) arrays, complementary metal oxide semiconductor (CMOS) arrays, or other imaging sensor arrays having a plurality of photosensitive elements (photosensors) defining image pixels. An illumination apparatus or system comprising light emitting diodes (LEDs) or other light source directs illumination toward a target object, e.g., a target bar code. Light reflected from the target bar code is focused through a system of one or more lens of the imaging system onto the sensor array. Thus, the target bar code within a field of view (FV) of the imaging lens system is focused on the sensor array.
Periodically, the pixels of the sensor array are sequentially read out generating an analog signal representative of a captured image frame. The analog signal is amplified by a gain factor and the amplified analog signal is digitized by an analog-to-digital converter. Decoding circuitry of the imaging system processes the digitized signals representative of the captured image frame and attempts to decode the imaged bar code.
As mentioned above, imaging-based bar code readers typically employ an imaging lens assembly for focusing scattered/reflected light from the field of view (FV) onto the sensor array. If a target object is within the field of view FV, an image of the target object will be focused onto the sensor array.
There are typically two types of imaging lens assemblies: 1) fixed focus lens systems; and 2) variable focus lens systems. In a fixed focus system, the field of view (FV) and a working range (WR) of the imaging system is fixed. The working range (WR) of an imaging system is a distance range in front of or forward of the imaging lens assembly within which a target object of interest, such as a target bar code, may be successfully imaged and decoded by the imaging system decoding circuitry.
The working range (WR) and field of view (FV) require a user to move the bar code reader relative to the target bar code such that the target bar code is within the field of view (FV) and within the working range (WR) of the imaging system for successful decoding of the imaged target bar code. At the near and far limits of the working range (WR), there is a problem with blurriness, that is, poor resolution of the imaged target bar code. A variable focus lens system addresses the blurriness problem at the limits of the working range (WR) by providing for readjustment/refocusing of the lens system. This readjustment/refocusing of the lens system facilitates obtaining an in-focus image of a target bar code focused onto the sensor array, thus, mitigating blurriness at the limits of the working range (WR).
Known mechanical variable focus lens assemblies depend on mechanical movement of one lens (or more lenses depending on the assembly) of lens assembly with respect to a stationary sensor array. Typically, an automatic focusing system controls movement of the lens of the variable focus lens assembly. Obviously as the lens moves, a sharpness of an image of a target object, such as a target bar code, focused on the sensor array changes with the position of the lens. In order to select the proper image focus, the automatic focusing system may analyze image quality, for example, in terms of the amount of blur in the captured image (hereafter “blur analysis”). Generally, automatic focusing systems select the lens position with the least blur for image capture and attempted decoding of the imaged target bar code.
However, within the field of view (FV), there are objects at different depths or distances from the lens assembly, thus, different regions of the image will have differing degrees of blurriness. In conventional consumer camera systems, a central portion of the image is utilized for blur analysis. While this approach may be appropriate for consumer camera systems, it is not effective for bar code imaging. In bar code imaging, it is desirable that the portion of the image used for blur analysis includes the bar code.
What is needed is a method and apparatus for automatically selecting a region of interest of a captured image for blur analysis that includes an image of the bar code.